{extend name="$BASE_POPUP_FORM" /}
{block name="body"}
    <div class="box-content"> 
        <input type="hidden" id="id" name="id" value="{$id}"/>
        <div class="control-row col-2">
            <div class="control-group">
                <label class="control-label">礼物名称</label>
                <div class="controls">
                    <input type="text" id="gift_name" name="gift_name" class="form-control required"  />
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">礼物价格</label>
                <div class="controls">
                    <input type="text" id="gift_amount" name="gift_amount" class="form-control"  />
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">动效图片名称</label>
                <div class="controls">
                    <input type="text" id="gif_name" name="gif_name" class="form-control"  />
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">分润百分比</label>
                <div class="controls">
                    <input type="text" id="profit" name="profit" class="form-control"  /> %
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">礼物状态</label>
                <div class="controls">
                    <select id="status" name="status" style="width: 90px">
                        <option value="0">禁用</option>
                        <option value="1">启用</option>
                    </select>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                图片
            </label>
            <div class="controls">
                <div id="js_upload_wrp">
                    <input type="hidden" id="gift_url" name="gift_url" value="" class="" />
                    {:hook('picResource',array('name'=>'gift_url','folder'=>'gift','tips'=>'建议尺寸：750x240像素。仅支持.jpg .png格式长方形照片。','callback'=>'uploadImgCallback'))}
                </div>
            </div>
        </div>
    </div>
{/block}
{block name="script"}
<script type="text/javascript">
function onLoadDataSuccess(data){
    setPicValue("gift_url", data['gift_url']);
    console.log(data)
}
function uploadImgCallback(path) {
    $("#gift_url").val(path);
}
</script>
{/block}


